<template>
    <!-- 多选按钮组边框 -->
    <el-checkbox-group v-model="value" @change="getCheckboxValue">
      <el-checkbox  label="备选项1" border></el-checkbox>
      <el-checkbox  label="备选项2" border></el-checkbox>
      <!-- <el-checkbox-button v-for="city in cities" :label="city" :key="city">{{city}}</el-checkbox-button> -->
    </el-checkbox-group>
</template>

<script lang="ts">
import { defineComponent, PropType, reactive, toRefs } from 'vue'
import { DataStruc } from "../../hook/datastruc";

export default defineComponent({
  type: 310,
  name: 'zCheckbox',
  props: {
    struc: {
      type: Object as PropType<DataStruc>,
    },
  },
  setup(props, context) {
    const getCheckboxValue = (e: string) => {
      checkboxValue.value = e
      console.log(e)
    }
    let checkboxValue = reactive(props.struc as DataStruc)
    return {
      getCheckboxValue,
      ...toRefs(checkboxValue)
    }
  }
})
</script>

<style>

</style>